import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-chart-percent',
  templateUrl: './chart-percent.component.html',
  styleUrls: ['./chart-percent.component.css']
})
export class ChartPercentComponent implements OnInit {

	public chartOptions;
  public chartOptions2;
  constructor() { }

  ngOnInit() {
  	this.chartOptions = {
      chart: {
        type: 'column'
      },
      title: {
        text: '时段综合导叶漏水率: 2%',
        align: 'left'
      },
      xAxis: {
        categories: ['1点', '2点', '3点', '4点', '5点', '6点', '7点']
      },
      yAxis: {
        gridLineColor: '#FFF',
        title: {
        	text: ''
        }
      },
      legend: {
        enabled: false
      },
      credits: {
        enabled: false
      },
      series: [{
        name: '导叶漏水率',
        data: [{y:0.3, color: '#3ec222'}, {y:0.4, color: '#3ec222'}, {y:0.4, color: '#3ec222'}
        ,{y:0.3, color: '#3ec222'}, {y:0.3, color: '#3ec222'}, {y:0.4, color: '#3ec222'}, {y:0.4, color: '#3ec222'}]
      }]
    }
    this.chartOptions2 = {
      chart: {
        type: 'spline'
      },
      title: {
        text: '时段综合效率偏差: 4%',
        align: 'left'
      },
      xAxis: {
        categories: ['1点', '2点', '3点', '4点', '5点', '6点', '7点', '8点']
      },
      yAxis: {
        title: '',
        gridLineColor: '#fff'
      },
      credits: {
        enabled: false
      },
      legend: {
      },
      series: [{
        name: '负荷',
        data: [0.7, 0.9, 0.5, 0.5, 0.7, 0.9, 0.5, 0.5]
      }, {
        name: '效率偏差',
        data: [0.2, 0.8, 0.7, 0.7, 0.2, 0.8, 0.7, 0.7]
      }]
      }
    }
}
